<p>/** zyg v1.0.0 | by pomelo</p>
<ul>
<li>(c) 2016 zyg, Inc., 250655604@qq.com</li>
<li>2016-10-12T15:06:33+0800
*/
$.fn.tap=function(t){var e=this,n=&quot;ontouchend&quot;in document.createElement(&quot;div&quot;),o=n?&quot;touchstart&quot;:&quot;mousedown&quot;,a=n?&quot;touchmove&quot;:&quot;mousemove&quot;,i=n?&quot;touchend&quot;:&quot;mouseup&quot;;e.each(function(){var e={};e.target=this,$(e.target).on(o,function(t){var o=&quot;touches&quot;in t?t.touches[0]:n?window.event.touches[0]:window.event;e.startX=o.clientX,e.startY=o.clientY,e.endX=o.clientX,e.endY=o.clientY,e.startTime=+new Date}),$(e.target).on(a,function(t){var o=&quot;touches&quot;in t?t.touches[0]:n?window.event.touches[0]:window.event;e.endX=o.clientX,e.endY=o.clientY}),$(e.target).on(i,function(n){if(+new Date-e.startTime&lt;300&amp;&amp;Math.abs(e.endX-e.startX)+Math.abs(e.endY-e.startY)&lt;20){var n=n||window.event;n.preventDefault(),t.call(e.target)}e.startTime=void 0,e.startX=void 0,e.startY=void 0,e.endX=void 0,e.endY=void 0})})};</li>
</ul>
